<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="org.store.pojo.*" %>
<%@ page import="org.user.pojo.*" %>
<%@ page import="org.store.tools.*"  %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
body {font-family: Arial, Helvetica, sans-serif; font-size:12px; text-align:center;}
a { text-decoration: none;}
#all {widht: 100%; text-align:center; margin:auto;}
#main { width: 96%; line-height: 1.8; margin:auto; border:1px #ccc dashed; text-align: left; text-indent: 2em;}

ul
{
	list-style-type: none;
	font-size: 12pt;
}
a {
	font-size: 12pt;	text-decoration: none;	color: #963;
	noline:expression(this.onfocus=this.blur);text-decoration:underline;
}
</style>
</head>
<%
ArrayList sps = (ArrayList)request.getAttribute("shops");
PageList  pl = (PageList) request.getAttribute("sppl");
 %>
<body>
<div id="all">
	<div id="main">
	<p><a href="/rsp/content/wwy/adminPage/main.jsp" >管理主页</a></p>
	<%
	for(int i = 0; i < sps.size() ;i++ ){
	Shop sp = (Shop) sps.get(i);
	
	 %>
		<p><%=sp.getName() %> &nbsp;&nbsp;&nbsp;
		<a href = "/rsp/goods/mshop?flag=2&shopId=<%=sp.getId() %>">删除</a> <a href = "/rsp/goods/mshop?flag=4&shopId=<%=sp.getId() %>">修改</a>
		<a href = "/rsp/content/wwy/adminPage/addGoods.jsp?shopId=<%=sp.getId() %>&spname=<%=sp.getName() %>">添加商品</a>
		</p>
  <%} %>
  
    <div id="pageList">
	<div align="center">
	<ul>
	<span class="STYLE1"><a href="/rsp/goods/mshop?flag=1&bg=1">首页</a>
	<%
		for (int i = 1; i <= pl.getMaxPage(); i++) {
		if (pl.getCurrentPage() == i) {
	%><%=i%> <%
 	} else {
 %> <a href="/rsp/goods/mshop?flag=1&&bg=<%=i%>"><%=i%></a> <%
 	}
 	}
 %> <a href="/rsp/goods/mshop?flag=1&&bg=<%=pl.getMaxPage()%>">尾页</a> </span>
	<li class="STYLE1">
	第<%=pl.getCurrentPage()%>页
	</li>
	<li class="STYLE1">
	共<%=pl.getMaxPage()%>页
	</li>
	</ul>
	</div>
	</div>
        
    </div>
</div>
</body>
</html>